{% extends "base.html" %}
{% load bootstrap3 %}
{% block title %}MAC地址导出{% endblock %}
{% block body_content_block %}
    <div class="row-fluid">
        <div class="span4">
            <legend>门店筛选</legend>
            <form  action="./" method="post">{% csrf_token %}
                {% bootstrap_form form layout='horizontal' %}

                <input class='btn btn-primary' id='button' type='submit' value='导出'/>
            </form>
        </div>
        <div class="span8">
            {% if gdatas %}
            <legend>匹配到的门店信息</legend>
                <table class="table table-bordered">
                    <thead>
                    <tr>
                        <th>门店id</th>
                        <th>门店名</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for group_id,group_name in gdatas %}
                        <tr>
                            <td>{{ group_id }}</td>
                            <td>{{ group_name }}</td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            {% endif %}
        </div>
    </div>

    <script>
        $('#id_startTime').datetimepicker({format: 'yyyy-mm-dd',
            language:  'zh-CN',
            weekStart: 1,
            todayBtn:  1,
            autoclose: 1,
            todayHighlight: 1,
            startView: 2,
            minView: 2,
            forceParse: 0});
        $( ".target" ).change(function() {
            $("#button").click()
        });
        $('#id_endTime').datetimepicker({format: 'yyyy-mm-dd',
            language:  'zh-CN',
            weekStart: 1,
            todayBtn:  1,
            autoclose: 1,
            todayHighlight: 1,
            startView: 2,
            minView: 2,
            forceParse: 0});


    </script>

{% endblock %}
